#include "Tower.h"

struct Vertex;

struct Edge
{
	Vertex* Origin;
	Vertex* Destination;
	int OriginId;
	int DestinationId;
	float Distance;
};

struct Vertex
{
	std::vector<Edge> Edges;
	std::vector<Edge> EdgesNotInLos;
	Vector2 data;
	float value = -1.0f;
	bool explored = false;
	bool doubleExtra = false;
	Vertex* last;
	void Connect(Vertex*);
	bool operator<(const Vertex& a) const
	{
		return (value >= 0.0f) && (value < a.value || a.value < 0.0f);
	}
	bool operator>(const Vertex& a) const
	{
		return !operator<(a);
	}
};

class Graph
{
public:
	Graph() {};
	Vertex* AddVertex(Vector2);
	void Clear();
	std::vector<Vertex*> GetVertices() { return Vertices; }

private:
	std::vector<Vertex*> Vertices;
};